/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaclientcp3110.Model.Component;

import common.Objects.Component;
import common.DAO.Factory.DAOFactory;

/**
 *
 * @author Richard Irons
 */
public class CompAddModel {
    private Component newComponent;

    public CompAddModel() {
        newComponent = new Component();
    }

    public Component getNewComponent() {
        return newComponent;
    }

    public void setNewComponent(Component newComponent) {
        this.newComponent = newComponent;
    }

    public boolean addNewComponent() {
        return DAOFactory.getDAOFactory().getComponentDAO().createComponent(newComponent);
    }
}
